<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/sub.css" />
		<link rel="stylesheet" type="text/css" href="css/home.css" />
		<script type="text/javascript" charset="utf-8">
			mui.init();
		</script>
	</head>
	<header class="shemher-header">
		<div class="shemher-bg">
			<div class="shemher-cover">
			</div>
			<img src="img/static/headimg.png" />
		</div>
		<!--<div class="shemher-con">
			<i class="remid-icon icon-serve mui-pull-right"></i>
			<div class="shemher-img">
				<div class="user-head">
					<img src="img/static/cirheader.png"/>
				</div>
				<ul class="shemher-info mt6">
					<li>昵称：老太太</li>
					<li>账号：133-3333-3333</li>
					<li class="mui-ellipsis">个性签名：描述描述描述述描述述描述</li>
					<li><a href="" class="shemher-amend">修改资料 ></a></li>
				</ul>
			</div>
		</div>-->
		<!--<div class="no-login close">
			<i class="remid-icon icon-serve mui-pull-right"></i>
			<div class="nologin-btn">
				<a href="login.html" class="href-login">登录</a>
				<a href="register.html" class="href-reg">注册</a>
			</div>
		</div>-->
	</header>
	<div class="mui-content">
		<div class="user-setting">
			<div class="home-section-header mt30">
				<h1 class="home-section-tit mod-title-30">我的婚礼</h1>
			</div>
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<i class="zjyy"></i>
					<a class="mui-navigate-right" href="my_topic.html">
						我的话题
					</a>
				</li>
				<li class="mui-table-view-cell">
					<i class="zjsc"></i>
					<a class="mui-navigate-right" href="my_collect.html">
						我的收藏
					</a>
				</li>
				<li class="mui-table-view-cell">
					<i class="zjgm"></i>
					<a class="mui-navigate-right" href="my_steward.html">
						我的管家
					</a>
				</li>
			</ul>
			<div class="home-section-header mt30">
				<h1 class="home-section-tit mod-title-30">其他</h1>
			</div>
			<ul class="mui-table-view mt10">
				<li class="mui-table-view-cell">
					<i class="zhaq"></i>
					<a class="mui-navigate-right" href="my_suggest.html">
						意见反馈
					</a>
				</li>
				<li class="mui-table-view-cell">
					<i class="zhsz"></i>
					<a class="mui-navigate-right">
						管家说明
					</a>
				</li>
				<li class="mui-table-view-cell">
					<i class="zhaq"></i>
					<a class="mui-navigate-right" href="my_contact.html">
						联系我们
					</a>
				</li>
				<li class="mui-table-view-cell">
					<i class="zhsz"></i>
					<a class="mui-navigate-right" href="my_amend.html">
						修改资料
					</a>
				</li>
			</ul>
		</div>
	</div>
		<!--脚部-->
	<nav class="mui-bar mui-bar-tab">
			<a class="mui-tab-item" href="index.html" data-id="index">
				<span class="foot-icon icon-home"></span>
				<span class="foot-icon-active icon-homeA"></span>
				<span class="mui-tab-label">首页</span>
			</a>
			<a class="mui-tab-item" href="discover.html" data-id="discover">
				<span class="foot-icon icon-discover"></span>
				<span class="foot-icon-active icon-discoverA"></span>
				<span class="mui-tab-label">发现</s pan>
			</a>
			<a class="mui-tab-item" href="newsay.html" data-id="newsay">
				<span class="foot-icon icon-say"></span>
				<span class="foot-icon-active icon-sayA"></span>
				<span class="mui-tab-label">新人说</span>
			</a>
			<a class="mui-tab-item" href="shop.html" data-id="shop">
				<span class="foot-icon icon-shop"></span>
				<span class="foot-icon-active icon-shopA"></span>
				<span class="mui-tab-label">商城</span>
			</a>
			<a class="mui-tab-item mui-active" href="myshemher.html" data-id="myshemher">
				<span class="foot-icon icon-personal"></span>
				<span class="foot-icon-active icon-personalA"></span>
				<span class="mui-tab-label">我的</span>
			</a>
		</nav>
	<script type="text/html" id="loginJs" >
		<div class="shemher-con">
			<i class="remid-icon icon-serve mui-pull-right"></i>
			<div class="shemher-img">
				<div class="user-head">
					<img src="{{portrait?portrait:'img/static/cirheader.png'}}"/>
				</div>
				<ul class="shemher-info mt6">
					<li>昵称：{{username}}</li>
					<li>账号：{{account_number}}</li>
					<li class="mui-ellipsis">个性签名：{{sign?sign:"你还没有个性签名快去填写吧！"}}</li>
					<li><a href="" class="shemher-amend">退出登录 ></a></li>
				</ul>
			</div>
		</div>
	</script>
	<script type="text/html" id="nologinJs">
		<div class="no-login">
			<i class="remid-icon icon-serve mui-pull-right"></i>
			<div class="nologin-btn">
				<a href="login.html" class="href-login">登录</a>
				<a href="register.html" class="href-reg">注册</a>
			</div>
		</div>
	</script>
	<script src="js/artTemplate.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/mod.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/cookie.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		//console.log(document.cookie);
		//setCookie("user", "4","h1");
		function isLogin(){
			var userId = getCookie("user");
			if(userId)
			{
				mui.ajax("http://www.xhwed.com/xhwe.php/User/UserTop",{
				dataType:"json",
				data:{"user":getCookie("user")},
				type:"post",
				success:function(data){
					console.log(data);
					if(data.msg="success"&&data.result!=null)
					{
						var html=template("loginJs",data.result);
						mui(".shemher-header")[0].insertAdjacentHTML("afterBegin",html);
					}else
						mui.alert(data.result);
				},
				error:function(){
				}
			})
			}else{
				var html=template("nologinJs",{});
				mui(".shemher-header")[0].insertAdjacentHTML("afterBegin",html);
			}
		}
		isLogin();
		mui(".shemher-header").on("tap",".shemher-amend",function(){
			if(mui(".shemher-con").length!=0)
			{
				console.log(mui(".shemher-con"));
				mui.confirm("你确认要退出登录？","消息提示框",["取消","确认"],function(e){
					   if (e.index == 1) 
					   {
					   	delCookie("user");
					   	mui(".shemher-header")[0].removeChild(mui(".shemher-con")[0]);
					   	isLogin();
					   }
				})
			}
		})
		
		mui(".shemher-header").on("tap",".no-login a",function(){
			window.location.href=this.getAttribute("href");	
		});
	</script>
	</body>

</html>